package server.business.login.handler;

import com.core.initialize.Message;
import com.google.protobuf.GeneratedMessage;

import server.ScriptEnum;
import server.ServerEngin;
import server.ServerHandler;
import server.business.login.ILoginScript;
import server.commonData.User;
/**
 * 退出游戏
 * @author King
 *
 */
public class QuiteGameHandler extends ServerHandler {

	@Override
	public Class<? extends GeneratedMessage> initBodyClass()
	{
		return null;
	}

	@Override
	protected void handler(Message msg, User user) throws Throwable
	{
		if(user==null)
			return;
		ILoginScript scripte = ServerEngin.getInstance().getScriptM().getScript(ScriptEnum.LOGIN_SCRIPT);
		scripte.quiteGame(user,true);
	}
}
